﻿
using FI.Core.IoC;

namespace FI.Core.Logging
{
    /// <summary>
    /// The factory to create <see cref="ILogger"/>.
    /// </summary>
    public static class LoggerFactories
    {
        /// <summary>
        /// Gets the ILogger.
        /// </summary>
        /// <returns>The <see cref="ILogger"/>.</returns>
        public static ILogger CreateLogger()
        {
            IServiceLocator serviceLocator = ServiceLocatorFactory.GetServiceLocator();
            ILoggerFactory loggerFactory = serviceLocator.GetService<ILoggerFactory>();
            return loggerFactory.Create();
        }
    }
}
